<% include header %>
<%if(shop.css){%>
<style type="text/css">
  <%=shop.css%>
</style>
<%}%>
<div class="wap columns clearfix">
  <%if(typeof locals.session.user.email == "undefined"){%>
  <div class="tip">即将推出帐号冲值功能，为了确保你的帐号安全，请填写邮箱地址，用于找回密码、重要安全功能。<a href="/user/account">马上去补全吧！</a></div>
  <%}%>
  <div class="left">
    <h1 class="page-title">
      <strong><%=shop.name%></strong>
      <span>电话：<%=shop.tel%></span>
      <span>地址：<%=shop.address%></span>
      <input type="hidden" id="shop_id" value="<%=shop._id%>">
      <input type="hidden" id="shop_name" value="<%=shop.name%>">
    </h1>
    <section class="main clearfix">
      <section class="food-list inner clearfix">
        <%
        if(group.length>0){
        group.forEach(function(item){
        %>
        <div>
          <div class="cat-title"><span><%=item.name%></span></div>
          <ul>
            <% item.foods.forEach(function(food){%>
            <li id="food-<%=food._id%>" data-id="<%=food._id%>" data-name="<%=food.name%>"
                data-price="<%=food.price%>">
              <%=food.name%><em><%=food.price%> 元</em></li>
            <% })%>
          </ul>
          <div class="clearfix"></div>
        </div>
        <% })}%>
        <% if(group.length<=0){ %>
        <p>还未添加美食</p>
        <%}%>
      </section>
    </section>
  </div>
  <div class="right">
    <section id="cart">
      <h3>我的餐盒</h3>

      <div class="r_mycart">
        <table cellpadding="0" cellspacing="0">
          <tbody>
          <tr>
            <th class="ttl">名称</th>
            <th width="40">份数</th>
            <th width="30">单价</th>
            <th class="del" width="30">删除</th>
          </tr>
          </tbody>
        </table>
        <p id="noItemTips" class="ptt pbb" style="text-align: center; display: none; ">您还没有添加菜品哦~</p>
        <table id="cartTable">
          <tbody>
          </tbody>
        </table>
      </div>
      <div class="buy"><span class="buy-btn">去结帐</span><strong class="buy-price">总价：<span
              id="cart_zongjia">0</span></strong>
      </div>
    </section>
  </div>
  <div id="car-confirm" class="reveal-modal">
    <h3>订单详情</h3>

    <div id="confirm-list"></div>
    <a class="close-reveal-modal">&#215;</a>
  </div>
</div>
<script src="/js/jquery.reveal.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/cart.js"></script>
<% include footer %>